package com.bingxue.edu.management.education.model.req;

import com.bingxue.edu.common.enums.ClassCategoryEnum;
import com.bingxue.edu.common.enums.SaleStatusEnum;
import com.bingxue.edu.common.enums.TermEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;

import static com.bingxue.edu.common.constant.DateConstants.FORMAT_TIME_YMD_HMS;

/**
 * 修改班级信息
 *
 * @author zq
 * @since 2024/08/21 00:02
 */
@Data
@Schema(description = "修改班级信息")
public class ClassInfoUpdateReq {

    @Schema(description="名称")
    private String name;

    @Schema(description="教学年份")
    private Integer classYear;

    @Schema(description="学期")
    private TermEnum term;

    @Schema(description="年级")
    private String grade;

    @Schema(description="科目")
    private String subject;

    @Schema(description="班级分类")
    private ClassCategoryEnum classCategory;

    @Schema(description="入学年份限制")
    private Integer admissionYearLimit;

    @Schema(description="班型")
    private String classTypeId;

    @Schema(description="班级等级限制")
    private Integer classLevelLimit;

//    @Schema(description="校区")
//    private String campusId;

//    @Schema(description="教室")
//    private String classroomId;

//    @Schema(description="主讲老师")
//    private String leadTeacherId;

    @Schema(description="辅导老师")
    private String assistTeacherId;

    @Schema(description="计划招生")
    private Integer planStudentCount;

    @Schema(description="允许调课次数")
    @NotNull(message = "允许调课次数不能为空")
    private Integer lessonChangeLimit;

    @Schema(description="总价")
    @NotNull(message = "总价不能为空")
    private Double totalPrice;

    @Schema(description="单价")
    @NotNull(message = "单价不能为空")
    private Double unitPrice;

    @Schema(description="上架状态")
    private SaleStatusEnum saleStatus;

    @Schema(description="续报开始时间")
    @JsonFormat(pattern = FORMAT_TIME_YMD_HMS, timezone = "GMT+8")
    private LocalDateTime renewalStartTime;

    @Schema(description="续报结束时间")
    @JsonFormat(pattern = FORMAT_TIME_YMD_HMS, timezone = "GMT+8")
    private LocalDateTime renewalEndTime;

    @Schema(description="开放报名时间")
    @JsonFormat(pattern = FORMAT_TIME_YMD_HMS, timezone = "GMT+8")
    private LocalDateTime enrollStartTime;

    @Schema(description="课程图片")
    @Length(max = 255, message = "课程图片长度不能超过 {max} 个字符")
    private String image;

    @Schema(description="课程描述")
    @Length(max = 900, message = "课程描述长度不能超过 {max} 个字符")
    private String description;

    @Schema(description="前序班级id")
    private String prevClassId;

    @Schema(description = "课时业绩系数")
    private Double lessonHourFactor;

    @Schema(description = "销售业绩系数")
    private Double salePerformanceFactor;


}
